3.14.55 \(\int \frac {x (1+x)^2}{(1+x^2)^3} \, dx\) [1355]

Optimal. Leaf size=39 \[ -\frac {(1+x)^2}{4 \left (1+x^2\right )^2}-\frac {1-x}{4 \left (1+x^2\right )}+\frac {1}{4} \tan ^{-1}(x) \]

[Out]

-1/4*(1+x)^2/(x^2+1)^2+1/4*(-1+x)/(x^2+1)+1/4*arctan(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {833, 653, 209} \begin {gather*} \frac {\text {ArcTan}(x)}{4}-\frac {(x+1)^2}{4 \left (x^2+1\right )^2}-\frac {1-x}{4 \left (x^2+1\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(1 + x)^2)/(1 + x^2)^3,x]

[Out]

-1/4*(1 + x)^2/(1 + x^2)^2 - (1 - x)/(4*(1 + x^2)) + ArcTan[x]/4

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 653

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*e - c*d*x)/(2*a*c*(p + 1)))*(a + c*x
^2)^(p + 1), x] + Dist[d*((2*p + 3)/(2*a*(p + 1))), Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x]
&& LtQ[p, -1] && NeQ[p, -3/2]

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x)^(m
 - 1)*(a + c*x^2)^(p + 1)*((a*(e*f + d*g) - (c*d*f - a*e*g)*x)/(2*a*c*(p + 1))), x] - Dist[1/(2*a*c*(p + 1)),
Int[(d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^2*f*(2*p + 3) + e*(a*e*g*m - c*
d*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ
[m, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

Rubi steps

\begin {align*} \int \frac {x (1+x)^2}{\left (1+x^2\right )^3} \, dx &=-\frac {(1+x)^2}{4 \left (1+x^2\right )^2}+\frac {1}{4} \int \frac {2+2 x}{\left (1+x^2\right )^2} \, dx\\ &=-\frac {(1+x)^2}{4 \left (1+x^2\right )^2}-\frac {1-x}{4 \left (1+x^2\right )}+\frac {1}{4} \int \frac {1}{1+x^2} \, dx\\ &=-\frac {(1+x)^2}{4 \left (1+x^2\right )^2}-\frac {1-x}{4 \left (1+x^2\right )}+\frac {1}{4} \tan ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 28, normalized size = 0.72 \begin {gather*} \frac {1}{4} \left (\frac {-2-x-2 x^2+x^3}{\left (1+x^2\right )^2}+\tan ^{-1}(x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(1 + x)^2)/(1 + x^2)^3,x]

[Out]

((-2 - x - 2*x^2 + x^3)/(1 + x^2)^2 + ArcTan[x])/4

________________________________________________________________________________________

Maple [A]
time = 0.63, size = 29, normalized size = 0.74

method result size
default \(\frac {\frac {1}{4} x^{3}-\frac {1}{2} x^{2}-\frac {1}{4} x -\frac {1}{2}}{\left (x^{2}+1\right )^{2}}+\frac {\arctan \left (x \right )}{4}\) \(29\)
risch \(\frac {\frac {1}{4} x^{3}-\frac {1}{2} x^{2}-\frac {1}{4} x -\frac {1}{2}}{\left (x^{2}+1\right )^{2}}+\frac {\arctan \left (x \right )}{4}\) \(29\)
meijerg \(\frac {x^{4}}{4 \left (x^{2}+1\right )^{2}}-\frac {x \left (-3 x^{2}+3\right )}{12 \left (x^{2}+1\right )^{2}}+\frac {\arctan \left (x \right )}{4}+\frac {x^{2} \left (x^{2}+2\right )}{4 \left (x^{2}+1\right )^{2}}\) \(52\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(x+1)^2/(x^2+1)^3,x,method=_RETURNVERBOSE)

[Out]

(1/4*x^3-1/2*x^2-1/4*x-1/2)/(x^2+1)^2+1/4*arctan(x)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 32, normalized size = 0.82 \begin {gather*} \frac {x^{3} - 2 \, x^{2} - x - 2}{4 \, {\left (x^{4} + 2 \, x^{2} + 1\right )}} + \frac {1}{4} \, \arctan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(1+x)^2/(x^2+1)^3,x, algorithm="maxima")

[Out]

1/4*(x^3 - 2*x^2 - x - 2)/(x^4 + 2*x^2 + 1) + 1/4*arctan(x)

________________________________________________________________________________________

Fricas [A]
time = 2.56, size = 40, normalized size = 1.03 \begin {gather*} \frac {x^{3} - 2 \, x^{2} + {\left (x^{4} + 2 \, x^{2} + 1\right )} \arctan \left (x\right ) - x - 2}{4 \, {\left (x^{4} + 2 \, x^{2} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(1+x)^2/(x^2+1)^3,x, algorithm="fricas")

[Out]

1/4*(x^3 - 2*x^2 + (x^4 + 2*x^2 + 1)*arctan(x) - x - 2)/(x^4 + 2*x^2 + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 27, normalized size = 0.69 \begin {gather*} \frac {\operatorname {atan}{\left (x \right )}}{4} + \frac {x^{3} - 2 x^{2} - x - 2}{4 x^{4} + 8 x^{2} + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(1+x)**2/(x**2+1)**3,x)

[Out]

atan(x)/4 + (x**3 - 2*x**2 - x - 2)/(4*x**4 + 8*x**2 + 4)

________________________________________________________________________________________

Giac [A]
time = 1.14, size = 27, normalized size = 0.69 \begin {gather*} \frac {x^{3} - 2 \, x^{2} - x - 2}{4 \, {\left (x^{2} + 1\right )}^{2}} + \frac {1}{4} \, \arctan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(1+x)^2/(x^2+1)^3,x, algorithm="giac")

[Out]

1/4*(x^3 - 2*x^2 - x - 2)/(x^2 + 1)^2 + 1/4*arctan(x)

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 29, normalized size = 0.74 \begin {gather*} \frac {\mathrm {atan}\left (x\right )}{4}-\frac {-\frac {x^3}{4}+\frac {x^2}{2}+\frac {x}{4}+\frac {1}{2}}{{\left (x^2+1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(x + 1)^2)/(x^2 + 1)^3,x)

[Out]

atan(x)/4 - (x/4 + x^2/2 - x^3/4 + 1/2)/(x^2 + 1)^2

________________________________________________________________________________________